Vue.component('mydiv', {
    template: `
<div class="panel-group " id="panel-768783">
                            <div class="panel panel-info">
                                <!--一级分类标题-->
                                <div class="panel-heading" >
                                    <a class="panel-title" data-toggle="collapse" data-parent="#panel-768783"
                                       href="#panel-element-660011">商品类</a>
                                    <a :href="'/admin/admin/addCls.html'" style="float: right" type="button"
                                       class="btn btn-info btn-xs"><i class="fa fa-plus-square-o" aria-hidden="true"></i></a> <!--添加-->
                                </div>
                                <!--一级分类内容-->
                                <div id="panel-element-660011" class="panel-collapse in ">
                                    <div class="panel-body" data-toggle="collapse">
                                        <!--二级分类标题-->
                                        <div class="panel panel-success" v-for="(c,i) in cls">
                                            <div class="panel-heading">
                                                <h4 style="font-size: 25px;" class="panel-title">
                                                    <a :href="'#collapse'+(i+1)" data-parent="#panel-768784" data-toggle="collapse">
                                                        {{c.name}}
                                                    </a>
                                                    <a @click="tiao" class="btn btn-info btn-xs" style="float: right" type="button"><i class="fa fa-plus-square-o" aria-hidden="true"></i></a> <!--添加-->
                                                </h4>
                                            </div>
                                            <!--二级分类内容3-->
                                            <div :id="'collapse'+(i+1)" class="panel-collapse collapse">
                                                <div class="panel-body" v-for="c1 in com" v-show="c1.classId==c.id">
                                                    <a @click="tiao1(c1.id)">{{c1.name}}</a>
                                                    <a style="float: right"
                                                       @click="upda(c1.id)" type="button" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a> <!--修改-->
                                                </div>

                                            </div>
                                        </div>


                                        <!--二级分类标题    标尺，源码-->
                                        <!--                            <div class="panel panel-default">-->
                                        <!--                                <div class="panel-heading">-->
                                        <!--                                    <h4 class="panel-title">-->
                                        <!--                                        <a data-toggle="collapse" href="#collapse4">-->
                                        <!--                                            尾气处理液-->
                                        <!--                                        </a>-->
                                        <!--                                    </h4>-->
                                        <!--                                </div>-->
                                        <!--                                &lt;!&ndash;二级分类内容3&ndash;&gt;-->
                                        <!--                                <div id="collapse4" class="panel-collapse collapse">-->
                                        <!--                                    <div class="panel-body">-->
                                        <!--                                        除碳1-->
                                        <!--                                    </div>-->
                                        <!--                                    <div class="panel-body">-->
                                        <!--                                        除碳2-->
                                        <!--                                    </div>-->
                                        <!--                                </div>-->
                                        <!--                            </div>-->


                                    </div>

                                    <div class="panel-body">
                                        ----
                                    </div>

                                </div>

                            </div>
                            <div class="panel panel-info">
                                <div class="panel-heading">
                                    <a class="panel-title collapsed" data-toggle="collapse" data-parent="#panel-768783"
                                       href="#panel-element-216435">资讯类</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <a :href="'/admin/admin/addCls.html'" class="btn btn-info btn-xs" style="float: right" type="button"><i class="fa fa-plus-square-o" aria-hidden="true"></i></a> <!--添加-->
                                </div>
                                <div id="panel-element-216435" class="panel-collapse collapse">
                                    <div class="panel-body" v-for="cc in rcls">
                                        <a :href="'/admin/admin/adminindexReport.html?'+cc.id">{{cc.name}}</a>
                                        <a :href="'/admin/admin/addReport.html'" class="btn btn-success btn-xs" style="float: right" type="button"><i class="fa fa-plus-square-o" aria-hidden="true"></i></a>
                                    </div>
                                </div>
                            </div>
                        </div> 
`,
        props:{
            cls: [] , //类集合
            com: [] , //商品集合
            rcls: [] , //资讯类集合
            rep: [] , //资讯集合
        }
    ,
    methods: {
        upda:function (id){
            location.href="/admin/admin/updateCommodity.html?id="+id;
        },
        tiao:function (id){
            location.href="/admin/admin/addCommodity1.html"
        },
        tiao1:function (id){
            location.href="/admin/admin/adminindexOneId.html?id="+id;
        }
    }
})

// var mydiv_v = new Vue({
//     el: "mydiv",
// })